      import request from '@/utils/request'

// 查询账户明细（收入/支出）列表
export function listDetail(query) {
  return request({
    url: '/accountDetail/detail/list',
    method: 'get',
    params: query
  })
}

// 查询账户明细（收入/支出）详细
export function getIncomeDetail(riderId) {
  return request({
    url: '/accountDetail/detail/income/'+riderId,
    method: 'get',
  })
}

      export function getExpenseDetail(riderId) {
        return request({
          url: '/accountDetail/detail/expense/'+riderId,
          method: 'get',
        })
      }
      export function getAccount(riderId) {
        return request({
          url: '/riderAccount/account/' + riderId,
          method: 'get'
        })
      }

// 新增账户明细（收入/支出）
export function addDetail(data) {
  return request({
    url: '/accountDetail/detail',
    method: 'post',
    data: data
  })
}

// 修改账户明细（收入/支出）
export function updateDetail(data) {
  return request({
    url: '/accountDetail/detail',
    method: 'put',
    data: data
  })
}

// 删除账户明细（收入/支出）
export function delDetail(ids) {
  return request({
    url: '/accountDetail/detail/' + ids,
    method: 'delete'
  })
}

      export function getOneIncome(id) {
        return request({
          url: '/accountDetail/detail/oneIncome/'+id,
          method: 'get'
        })
      }
      export function getOneExpense(id) {
        return request({
          url: '/accountDetail/detail/oneExpense/'+id,
          method: 'get'
        })
      }
